<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="nc.vo.sm.UserVO"%>
<%@ page import="nc.vo.ebvp.logindex.pojo.Constant"%>
<%@ page import="nc.bs.ebvp.sourcingcoll.Constants"%>
<%@ page import="nc.bs.ebvppub.ebvpservicefactory.LoadConfigProperty"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="/WEB-INF/lang-support.tld" prefix="lang-support"%>  
<%  
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	if(basePath.endsWith("/")){
		basePath = basePath.substring(0,basePath.length()-1);
	}
	String strProjPk = request.getParameter("pkProj");
	//2：发采购文件环节，3：发布与应答环节
	String type = request.getParameter("type");
	String strParaEc021 = (String) request.getSession().getAttribute(Constants.ID_EC021);
	String strParaEc022 = (String) request.getSession().getAttribute(Constants.ID_EC022);
	UserVO userVo = (UserVO) request.getSession().getAttribute(Constant.USER_INFO);
	boolean isClientCa = false;
	boolean isServerCa = false;
	//供应商客户端是否支持CA
	if ("Y".equalsIgnoreCase(strParaEc021)
			|| (null != userVo.getIsca() && userVo.getIsca().booleanValue())) {
		isClientCa = true;
	}
	//招投标服务器是否支持CA
	if ("Y".equalsIgnoreCase(strParaEc022)) {
		isServerCa = true;
	}
	//CA厂商名称
	String strCaFactory = (String) request.getSession().getAttribute(LoadConfigProperty.EBVP_CA_FACTORY);
	String strReadOnly = (String)request.getAttribute("readonly");
%>
<html>
<head>
		<script type="text/javascript">
			var strProjStepPk="${REPLY_FORM.pk_purproj_step}";
			var ebvpContext = "<%=basePath%>";
			var isClientCa = "<%=isClientCa%>";
			var type = "<%=type%>";
			//单价精度
			var intPricePrecision = ${PRICE_PRECISION};
			//金额精度
			var intMnyPrecision = ${MONEY_PRECISION};
			//设置供应商已经报价的个数
			//var intProdCount = ${PRICE_COUNT} + 1;
			//是否允许部分报价
			var isPartPrice = "${PURPROJECT_FORM.isPartPrice}";
			//是否严格控制数量
			var isCtrlAmount = "${PURPROJECT_FORM.iscontrolnum}";
			//是否处理通过
			var isHandlePass = "${REPLY_FORM.handleResult}";
			//是否存在延时并允许应答
			var isDelayCanReply = "${isDelayCanReply}";
			var msg = "${msg}";
			var strSelLan = "${sel_lan}";
			//产品明细个数
			var intProdCount = ${PROD_COUNT};
		</script>
		<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/bid.css" />
		<script type="text/javascript" src="commonres/common/frame/src/js/bid_purchase.js"></script>
		<script type="text/javascript" src="<%=path%>/commonres/common/frame/src/js/bid_flow.js"></script>
		<%if(isClientCa||isServerCa){%>
		<%if(Constants.CA_FACTORY_ITRUS.equals(strCaFactory)){%>
		<script type="text/javascript" src="js/itrusforNC.js"></script>
		<script type="text/javascript" src="js/pta.js"></script>
		<%} else if(Constants.CA_FACTORY_INFOSEC.equals(strCaFactory)){%>
		<script type="text/javascript" src="js/Infosec4NC.js"></script>
		<%} else if(Constants.CA_FACTORY_DEAN.equals(strCaFactory)){%>
		<script type="text/javascript" src="js/DatechJs.js"></script>
		<%} %>
		<%}%>
		<lang-support:langres resid="ec22400_0;ec22211_0" />
</head>
<body>
<!-- Document Content -->
<form action="" method="post" name="replyform">
<input type="hidden" name="casn" value=""/>
<input type="hidden" name="pk_file" />
<input type="hidden" name="file_name" />
<div class="float_center doc_width">
	<div class="doc_content_shadow">
		<div class="doc_content">
			<div id="bidFlowMore" class="bid_flow"></div>
			<div class="bid_content">
				<div class="bid_content_inner">
				    <div id="countdownTimer" class="bid_module bdbtm w_690px pd_10x5px"></div>
				    <div class="bid_module quoted pd_16x0px bdbtm">
				        <div class="float_left w_100ps">
				            <div class="float_left w_430px mrg_rit20px">
				                <span resid="0ec22211-000001" class="float_left w_94px align_right">应答截止时间：</span>
				                <span>${RELEASE_FORM.bid_end_time}</span>
				            </div>
				            <div class="float_left w_230px mrg_rit20px">
				                <span resid="0ec22211-000093" class="float_left w_110px align_right">标书类型：</span>
				                <span>${RELEASE_FORM.biddoc_type}</span>
				            </div>
				        </div>
				        <div class="float_left w_100ps">
				        	<div class="float_left w_430px mrg_rit20px">
				                <span resid="0ec22211-000055" class="float_left w_94px align_right">开启时间：</span>
				                <span>${RELEASE_FORM.unseal_time}</span>
				            </div>
				            <div class="float_left w_230px mrg_rit20px">
					            <span resid="0ec22211-000094" class="float_left w_110px align_right">截止时间延长至：</span>
					            <span>${RELEASE_FORM.delayTime}</span>
				            </div>
				        </div>
				        <div class="float_left w_100ps">
				            <span resid="0ec22211-000002" class="float_left w_94px align_right">开启地点：</span>
				            <span class="float_left w_600px">${RELEASE_FORM.unseal_addr}</span>
				        </div>
				        <div class="float_left w_100ps">
				            <span resid="0ec22211-000003" class="float_left w_94px align_right">备注：</span>
				            <span class="float_left w_600px">${RELEASE_FORM.memo}</span>
				        </div>
				    </div>
				    <div class="bid_notice_title" style="margin-left:29px">
                    	<a resid="0ec22211-000004" href="javascript:hideInform(false);" class="color_0069b9">要求</a>
                    </div>
				    <div class="bid_module detail pd_10x5px">
				        <div class="float_left w_100ps">
				            <div class="float_right w_640px">
				                <strong resid="0ec22211-000005">交货要求：</strong><br/>
				                <div style="overflow:hidden;word-wrap:break-word">${RELEASE_FORM.deliver_request}</div>
				            </div>
				            <div class="float_right w_640px">
				                <strong resid="0ec22211-000006">付款要求：</strong><br/>
				                <div style="overflow:hidden;word-wrap:break-word">${RELEASE_FORM.pay_request}</div>
				            </div>
				            <div class="float_right w_640px">
				                <strong resid="0ec22211-000007">报价要求：</strong><br/>
				                <div style="overflow:hidden;word-wrap:break-word">${RELEASE_FORM.price_request}</div>
				            </div>
				        </div>
				        <div class="float_right color_0069b9">
				            <span resid="0ec22211-000087">［</span><a resid="0ec22211-000008" href="javascript:hideInform(true);" class="color_0069b9">了解</a><span resid="0ec22211-000088">］</span>
				        </div>
				    </div>
				</div>
				<div resid="0ec22211-000009" class="bid_invited_content_title">采购文件应答</div>
				<div class="bid_content_inner pd_5x0px">
				<c:if test="${RELEASE_FILE_FORM != null}">
					<c:forEach items="${RELEASE_FILE_FORM}" var="file">
				    <div class="bid_invited_file_list <c:if test='${file.index > 1}'>bdtop_dashed</c:if>">
				        <div class="float_left w_690px">
				        	<c:if test="${file.file_type == '1'}">
				            <div class="float_right">
				            	<% if (!"readOnly".equals(strReadOnly)){%>
				                <a href="javascript:uploadFile('${file.pk_release_file_b}');" class="btn_gray btn_save">
				                    <span resid="0ec22211-000010" class="w_66px">应答</span>
				                </a>
				               	<%}%>
				            </div>
				            </c:if>
				            <input type="hidden" name="pub_file_pk" id="pub_file_pk" value="${file.pk_release_file_b}" />
							<input type="hidden" name="pub_file_name" id="pub_file_name" value="${file.file_name}" />
				            <span>${file.index}、</span>
				            <c:if test="${file.file_type == '1'}">
								<span resid="0ec22211-000014">采购文件</span>
				            </c:if>
				             <c:if test="${file.file_type == '2'}">
								<span resid="0ec22211-000096">补充文件</span>
				            </c:if>
							<a href="javascript:downloadFile('${file.pk_file}','${file.file_name}');" style="text-decoration:none"><span class="color_0062b0">${file.file_name}</span></a>
				            <span> (${file.file_size}KB) </span>
				            [<a resid="0ec22211-000011" href="javascript:downloadFile('${file.pk_file}','${file.file_name}');">下载</a>]
				            <% if (isServerCa) {%>
								<a class="btn_blue" id="onCheckFile" name="onCheckFile" href="javascript:verifyFile('${file.signature}','${file.index}');;" style="margin-left:3px;float:right"><span resid="0ec22211-000089" class="w_34px h_18px ft_14px">验签</span></a>
								<input name="fileName" type="file" style="float:right" size="10" />
							<% } %>
				            <span class="bid_invited_file_note">${file.file_note}</span>
				        </div>
				    </div>
					</c:forEach>
				</c:if>
				</div>
				<div resid="0ec22211-000012" class="bid_invited_content_title">投标文件</div>
				<div class="subpage_table" style="width:728px;margin-top:0px;padding:0px">
				<table id="bidFileTable" cellpadding="0" cellspacing="0" style="width:728px">
					<thead>
					<tr>
						<td resid="0ec22211-000013" width="30px">序号</td>
						<td resid="0ec22211-000014" width="200px">采购文件</td>
						<td resid="0ec22211-000015" width="240px">应答文件</td>
						<td resid="0ec22211-000016" width="50px">大小</td>
						<td resid="0ec22211-000017" width="160px">备注</td>
						<td resid="0ec22211-000018" width="48px">删除</td>
					</tr>
					</thead>
					<c:if test="${REPLY_FILE_FORM != null}">
						<c:forEach items="${REPLY_FILE_FORM}" var="file">
							<tr id="${file.pk_file}" <c:if test="${file.index%2==0}">class="odd"</c:if>>
								<input type="hidden" id="reply_file_real_path" name="reply_file_real_path" value="${file.real_path}"/>
								<input type="hidden" id="pk_release_file_b" name="pk_release_file_b" value="${file.pk_release_file_b}" />
								<td>${file.index}</td>
								<td>${file.release_file_name}</td>
								<td>${file.file_name}<input type="hidden" id="reply_file_name" name="reply_file_name" value="${file.file_name}" /></td>
								<td><span id="showSize">${file.file_size}</span>KB<input type="hidden" id="reply_file_size" name="reply_file_size" value="${file.file_size}" /></td>
								<td>${file.file_note}<input type="hidden" id="fileMemo" name="fileMemo" value="${file.file_note}" >&nbsp;</td>
								<td>
									<% if (!"readOnly".equals(strReadOnly)){%>
									<a id="onDelete" class="btn_orange" href="javascript:delFile('${file.pk_file}');" style="margin-left:3px"><span resid="0ec22211-000019" class="w_34px h_18px ft_14px">删除</span></a>
									<%}%>
								</td>
							</tr>
						</c:forEach>
					</c:if>
				</table>
				</div>
				<c:if test="${RELEASE_FORM.is_quote == \"true\"}">
				<div class="bid_module_title" style="margin-top:10px;">
				    <strong resid="0ec22211-000020" style="padding-left:0px">报价单元</strong>
				</div>
				<div class="bid_content_inner">
				<c:if test="${RELEASE_FORM.price_tplt_type != 1}">
				<strong resid="0ec22211-000021" class="bid_quoted_title">产品报价</strong>
				<c:if test="${RELEASE_FORM.price_tplt_type == 3}">
					<a href="javascript:addProdItem();" id="bidSubmit" class="btn_gray btn_save" style="float:right;margin-top:6px;margin-right:7px">
				        <span resid="0ec22211-000022" class="w_94px h_25px ft_12px">增加报价信息</span>
				    </a>
			    </c:if>
				<div class="bid_products">
				<ul class="bid_products_header">
				    <li resid="0ec22211-000056" class="first_column" style="text-align:center;text-indent:0px">产品</li>
				    <li resid="0ec22211-000023" class="amount_column">数量</li>
				    <li resid="0ec22211-000024" class="price_column">价格</li>
				    <li resid="0ec22211-000025" class="last_column">金额</li>
				    <c:if test="${RELEASE_FORM.price_tplt_type == 3}">
				    <li resid="0ec22211-000086" class="btn_column">操作</li>
				    </c:if>
				</ul>
				<c:forEach items="${PRICE_DETAIL_FORM}" var="pricedetail">
					<input type="hidden" name="pk_pricedata_b" value="${pricedetail.pk_pricedata_b}"/>
					<input type="hidden" name="detail_pk_pricetplt_h" value="${pricedetail.pk_pricetplt_h}"/>
					<input type="hidden" name="pk_pricetplt_b" value="${pricedetail.pk_pricetplt_b}"/>
					<input type="hidden" name="pk_prod" value="${pricedetail.pk_prod}"/>
					<input type="hidden" name="pk_prod_v" value="${pricedetail.pk_prod_v}"/>
					<input type="hidden" name="pk_prod_cls" value="${pricedetail.pk_prod_cls}"/>
					<input type="hidden" name="pk_prod_unit" value="${pricedetail.pk_prod_unit}"/>
					<input type="hidden" name="prod_src" value="${pricedetail.prod_src}"/>
					<input type="hidden" name="amount_precision" value="${pricedetail.amount_precision}" />
					<input type="hidden" name="row_id" value="${pricedetail.detail_index}" />
					<!-- 如果来自后台代替应答报价（包含来自价格模板和代替应答添加的结构化和非结构化产品） -->
					<c:if test="${(pricedetail.pk_pricetplt_b != null && (null == pricedetail.pricedata_src || ''==pricedetail.pricedata_src))
					||(pricedetail.pk_pricetplt_b == null && pricedetail.prod_src !='3' && (null == pricedetail.pricedata_src || ''==pricedetail.pricedata_src))}">
						<div class="bid_products_body bg_f8">
							<!-- 产品信息 -->
						    <div class="first_column">
								<input type="hidden" id="prod_name" name="prod_name" value="${pricedetail.prod_name}"/>
						        <strong>
							        <c:if test="${pricedetail.prod_name != null && '' !=pricedetail.prod_name}">													
										${pricedetail.detail_index}、${pricedetail.prod_name}
									</c:if>
									<c:if test="${pricedetail.prod_name == null || '' ==pricedetail.prod_name}">													
										${pricedetail.detail_index}、${pricedetail.config_note}
									</c:if>
								</strong>
								<div class="form_row w_100ps" style="margin-left:17px;">
									<c:if test="${'1' == pricedetail.assistant8 && pricedetail.assistant9 != null && ''!=pricedetail.assistant9 && '0'!=pricedetail.assistant9}">
									<div class="form_title w_80px">上轮最低价格</div>
									</c:if>
									<div class="form_field">
									<c:if test="${'1' == pricedetail.assistant8 && pricedetail.assistant9 != null && ''!=pricedetail.assistant9 && '0'!=pricedetail.assistant9}"> 
										<input type='text' id='zdj' name='zdj' class="textfield pd_2px w_100px h_12px" style="background-color:white" value='${pricedetail.assistant10}' readonly>
									</c:if>
										<input type='hidden' id='sup_prodcode' name='sup_prodcode' class="textfield pd_2px w_100px h_12px" style="background-color:white" value='${pricedetail.sup_prodcode}' >
									</div>
								</div>
						        <dl class="bid_product_config">
						            <c:if test="${pricedetail.prod_spec != null && ''!=pricedetail.prod_spec }"> 
										<dt resid="0ec22211-000027">规格：</dt>
						            	<dd>${pricedetail.prod_spec}</dd>
						            </c:if>
									<input type='hidden' name='prod_spec' id='prod_spec' value='${pricedetail.prod_spec}'/>
						        </dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.prod_type != null && ''!=pricedetail.prod_type}">
									 	<dt resid="0ec22211-000028">型号：</dt>
						            	<dd>${pricedetail.prod_type}</dd>
									</c:if>
									<input type='hidden' name='prod_type'  id='prod_type' value='${pricedetail.prod_type}'/>
								</dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.project != null && ''!= pricedetail.project }">
									  	<dt resid="0ec22211-000029"> 项目：</dt>
						            	<dd>${pricedetail.project}</dd>
									 </c:if>
								</dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.producer != null && ''!=pricedetail.producer}">
									  	<dt resid="0ec22211-000030">厂商：</dt>
						            	<dd>${pricedetail.producer}</dd>
									 </c:if>
								</dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.asistantproperty != null && '' !=pricedetail.asistantproperty}">
									  	<dt resid="0ec22211-000031">描述：</dt>
										<dd>${pricedetail.asistantproperty}</dd>
									 </c:if>
									<c:if test="${pricedetail.asistantproperty != null && '' != pricedetail.asistantproperty && pricedetail.config_note != null && '' != pricedetail.config_note}">
										,${pricedetail.config_note}
									</c:if>
									<c:if test="${(pricedetail.prod_name != null && '' != pricedetail.prod_name) && (pricedetail.asistantproperty == null || '' ==pricedetail.asistantproperty) && pricedetail.config_note != null && '' != pricedetail.config_note}">
										<dt resid="0ec22211-000031">描述：</dt>
										<dd>${pricedetail.config_note}</dd>
									</c:if>
									<input type="hidden" name="config_note" id="config_note" value="${pricedetail.config_note}"/>
						        </dl>
						    </div>
						    <!-- 数量信息 -->
						    <div class="amount_column">
						    	<input type='text' id='amount' name='amount' class="textfield pd_2px w_100px" style="border-style:none;text-align:right"  value='${pricedetail.amount}' readonly/>${pricedetail.prod_unit_name}
								<input type="hidden" id="prod_unit_name" name="prod_unit_name" value="${pricedetail.prod_unit_name}"/>
						    </div>
						     <!-- 报价信息 -->
						    <div class="price_column">
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000032" class="form_title" style="text-align:left;width:48px">含税单价</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="has_tax_price" name="has_tax_price" class="textfield pd_2px w_100px h_12px"  value="${pricedetail.has_tax_price}" onchange="subReduNum(this,'${PRICE_PRECISION}');jy(this,'${pricedetail.assistant8}','${pricedetail.assistant9}');doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);"/>
						                </label>
						            </div>
						        </div>
						       	<div class="form_row w_100ps">
						            <div resid="0ec22211-000033" class="form_title" style="text-align:left;width:48px;display:none">折扣率</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="detail_discount" name="detail_discount" class="textfield pd_2px w_100px h_12px" value="${pricedetail.detail_discount}" onchange="subReduNum(this,2);doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);" />
						                </label>
						            </div>
						        </div>
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000034" class="form_title" style="text-align:left;width:48px">税率</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="tax_rate" name="tax_rate"  class="textfield pd_2px w_100px h_12px" value="${pricedetail.tax_rate}" onchange="subReduNum(this,2);doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);" />
						                </label>
						            </div>
						        </div>
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000035" class="form_title" style="text-align:left;width:48px">折后价</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="discount_net_price" name="discount_net_price" class="textfield pd_2px w_100px h_12px" readonly value="${pricedetail.priceAfterDiscount}" />
						                </label>
						            </div>
						        </div>
						    </div>
						    <div class="last_column">
						        <span><input type="text" id="discount_net_sum" name="discount_net_sum" class="textfield pd_2px w_100px color_f73107" style="border-style:none;text-align:right" readonly value="${pricedetail.amountAfterDiscount}" /></span>
						    </div>
						</div>
					</c:if>
					<!-- 如果来自统一定价 门户不可修改 -->
					<c:if test="${pricedetail.pk_pricetplt_b != null && null != pricedetail.pricedata_src}">
						<div class="bid_products_body bg_f8">
							<!-- 产品信息 -->
						    <div class="first_column">
						    	<input type="hidden" id="prod_name" name="prod_name" value="${pricedetail.prod_name}" />
						        <strong>
						        	${pricedetail.detail_index}、${pricedetail.prod_name}
								</strong>
								<div class="form_row w_100ps" style="margin-left:17px;">
									<c:if test="${'1' == pricedetail.assistant8 && pricedetail.assistant9 != null && ''!=pricedetail.assistant9 && '0'!=pricedetail.assistant9}">
									<div class="form_title w_80px">上轮最低价格</div>
									</c:if>
									<div class="form_field">
									<c:if test="${'1' == pricedetail.assistant8 && pricedetail.assistant9 != null && ''!=pricedetail.assistant9 && '0'!=pricedetail.assistant9}"> 
										<input type='text' id='zdj' name='zdj' class="textfield pd_2px w_100px h_12px" style="background-color:white" value='${pricedetail.assistant10}'  readonly>
									</c:if>
										<input type='hidden' id='sup_prodcode' name='sup_prodcode' class="textfield pd_2px w_100px h_12px" style="background-color:white" value='${pricedetail.sup_prodcode}' />
									</div>
								</div>
						        <dl class="bid_product_config">
						            <c:if test="${pricedetail.prod_spec != null && ''!=pricedetail.prod_spec }"> 
										<dt resid="0ec22211-000027">规格：</dt>
						            	<dd>${pricedetail.prod_spec}</dd>
						            </c:if>
									<input type='hidden' name='prod_spec' id='prod_spec' value='${pricedetail.prod_spec}'/>
								</dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.prod_type != null && ''!=pricedetail.prod_type}">
									 	<dt resid="0ec22211-000028">型号：</dt>
						            	<dd>${pricedetail.prod_type}</dd>
									</c:if>
									<input type='hidden' name='prod_type'  id='prod_type' value='${pricedetail.prod_type}'/>
								</dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.project != null && ''!= pricedetail.project }">
									  	<dt resid="0ec22211-000029"> 项目：</dt>
						            	<dd>${pricedetail.project}</dd>
									 </c:if>
								</dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.producer != null && ''!=pricedetail.producer}">
									  	<dt resid="0ec22211-000030">厂商：</dt>
						            	<dd>${pricedetail.producer}</dd>
									 </c:if>
								</dl>
						        <dl class="bid_product_config">
									<c:if test="${pricedetail.asistantproperty != null && '' !=pricedetail.asistantproperty}">
									  	<dt resid="0ec22211-000031">描述：</dt>
										<dd>${pricedetail.asistantproperty}</dd>
									 </c:if>
									<c:if test="${pricedetail.asistantproperty != null && '' != pricedetail.asistantproperty && pricedetail.config_note != null && '' != pricedetail.config_note}">
										,${pricedetail.config_note}
									</c:if>
									<c:if test="${(pricedetail.prod_name != null && '' != pricedetail.prod_name) && (pricedetail.asistantproperty == null || '' ==pricedetail.asistantproperty) && pricedetail.config_note != null && '' != pricedetail.config_note}">
										<dt resid="0ec22211-000031">描述：</dt>
										<dd>${pricedetail.config_note}</dd>
									</c:if>
									<input type="hidden" name="config_note" id="config_note" value="${pricedetail.config_note}"/>
						        </dl>
						    </div>
						    <!-- 数量信息 -->
						    <div class="amount_column">
						    	<input type='text' id='amount' name='amount' class="textfield pd_2px w_100px" style="border-style:none;text-align:right"  value='${pricedetail.amount}' readonly/>${pricedetail.prod_unit_name}
								<input type="hidden" id="prod_unit_name" name="prod_unit_name" value="${pricedetail.prod_unit_name}"/>
						    </div>
						     <!-- 报价信息 -->
						    <div class="price_column">
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000032" class="form_title" style="text-align:left;width:48px">含税单价：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="has_tax_price" name="has_tax_price" class="textfield pd_2px w_100px h_12px"  value="${pricedetail.has_tax_price}" onchange="subReduNum(this,'${PRICE_PRECISION}');jy(this,'${pricedetail.assistant8}','${pricedetail.assistant9}');doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);"/>
						                </label>
						            </div>
						        </div>
						       	<div class="form_row w_100ps">
						            <div resid="0ec22211-000033" class="form_title" style="text-align:left;width:48px;display:none">折扣率：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="detail_discount" name="detail_discount" class="textfield pd_2px w_100px h_12px" value="${pricedetail.detail_discount}" onchange="subReduNum(this,2);doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);" />
						                </label>
						            </div>
						        </div>
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000034" class="form_title" style="text-align:left;width:48px">税率：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="tax_rate" name="tax_rate"  class="textfield pd_2px w_100px h_12px" value="${pricedetail.tax_rate}" onchange="subReduNum(this,2);doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);" />
						                </label>
						            </div>
						        </div>
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000035" class="form_title" style="text-align:left;width:48px">折后价：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="discount_net_price" name="discount_net_price" class="textfield pd_2px w_100px h_12px" readonly value="${pricedetail.priceAfterDiscount}" />
						                </label>
						            </div>
						        </div>
						    </div>
						    <div class="last_column">
						        <span><input type="text" id="discount_net_sum" name="discount_net_sum" class="textfield pd_2px w_100px color_f73107" style="border-style:none;text-align:right" readonly value="${pricedetail.amountAfterDiscount}" /></span>
						    </div>
						</div>
					</c:if>
					<!-- 门户自己添加产品 -->
					<c:if test="${pricedetail.pk_pricetplt_b == null &&  pricedetail.prod_src =='3'}">
						<div id="${pricedetail.pk_pricedata_b}" class="bid_products_body bg_f8">
							<!-- 产品信息 -->
						    <div class="first_column">
						    	<input type="hidden" id="prod_name" name="prod_name" value="${pricedetail.prod_name}" />
						        <strong>
						        	${pricedetail.detail_index}、${pricedetail.prod_name}
								</strong>
								<div class='form_row w_100ps' style='margin-left:17px;'>
									<c:if test="${'1' == pricedetail.assistant8 && pricedetail.assistant9 != null && ''!=pricedetail.assistant9 && '0'!=pricedetail.assistant9}">
									<div class='form_title w_80px'>上轮最低价格</div>
									</c:if>
									<div class='form_field'>
									<c:if test="${'1' == pricedetail.assistant8 && pricedetail.assistant9 != null && ''!=pricedetail.assistant9 && '0'!=pricedetail.assistant9}"> 
										<input type='text' id='zdj' name='zdj' class="textfield pd_2px w_100px h_12px" style="background-color:white" value='${pricedetail.assistant10}' readonly>								
									</c:if>
										<input type='hidden' id='sup_prodcode' name='sup_prodcode' class="textfield pd_2px w_100px h_12px" style='background-color:white;' value='${pricedetail.sup_prodcode}' />
									</div>
								</div>
						        <dl class="bid_product_config">
									<dt resid="0ec22211-000027">规格</dt>
									<dd>
										<input type='text' id='prod_spec' name='prod_spec' class="textfield pd_2px w_100px h_12px" style='background-color:white;' value='${pricedetail.prod_spec}' />
									</dd>
								</dl>
								<dl class="bid_product_config">
									<dt resid="0ec22211-000028">型号</dt>
									<dd>
										<input type='text' id='prod_type' name='prod_type' class="textfield pd_2px w_100px h_12px" style='background-color:white;' value='${pricedetail.prod_type}' />
									</dd>
								</dl>
								<dl class="bid_product_config">
									<dt resid="0ec22211-000031">描述</dt>
									<dd>
										<input type='text' id='config_note' name='config_note' class="textfield pd_2px w_100px h_12px" style='background-color:white;' value='${pricedetail.config_note}' />
									</dd>
						        </dl>
						    </div>
						    <!-- 数量信息 -->
						    <div class="amount_column">
						    	<dl class='bid_product_config' style='margin-left:0px;margin-top:0px;margin-bottom:0px'>
						    		<dt resid="0ec22211-000036">数量</dt>
						    		<dd style='width:59px'>
						    			<input type='text' id='amount' name='amount' class="textfield pd_2px w_66px h_12px" style='background-color:white;' value='${pricedetail.amount}' onchange="subReduNum(this,'${pricedetail.amount_precision}');doCalPrice(${pricedetail.detail_index});" onkeypress="javascript:keyPress(this,event);" />
						    		</dd>
						    	</dl>
						    	<dl class='bid_product_config' style='margin-left:0px;margin-top:0px;margin-bottom:0px'>
							    	<dt resid="0ec22211-000037">单位</dt>
							    	<dd style='width:59px'>
							    		<input type='text' id='prod_unit_name' name='prod_unit_name' class="textfield pd_2px w_66px h_12px" style='background-color:white;' value='${pricedetail.prod_unit_name}' />
							    	</dd>
						    	</dl>
						    </div>
						     <!-- 报价信息 -->
						    <div class="price_column">
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000032" class="form_title" style="text-align:left;width:48px">含税单价：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="has_tax_price" name="has_tax_price" class="textfield pd_2px w_100px h_12px"  value="${pricedetail.has_tax_price}" onchange="subReduNum(this,'${PRICE_PRECISION}');jy(this,'${pricedetail.assistant8}','${pricedetail.assistant9}');doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);"/>
						                </label>
						            </div>
						        </div>
						       	<div class="form_row w_100ps">
						            <div resid="0ec22211-000033" class="form_title" style="text-align:left;width:48px;display:none">折扣率：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="detail_discount" name="detail_discount" class="textfield pd_2px w_100px h_12px" value="${pricedetail.detail_discount}" onchange="subReduNum(this,2);doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);" />
						                </label>
						            </div>
						        </div>
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000034" class="form_title" style="text-align:left;width:48px">税率：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="tax_rate" name="tax_rate"  class="textfield pd_2px w_100px h_12px" value="${pricedetail.tax_rate}" onchange="subReduNum(this,2);doCalPrice('${pricedetail.detail_index}');" onkeypress="javascript:keyPress(this,event);" />
						                </label>
						            </div>
						        </div>
						        <div class="form_row w_100ps">
						            <div resid="0ec22211-000035" class="form_title" style="text-align:left;width:48px">折后价：</div>
						            <div class="form_field">
						                <label>
						                	<input type="text" id="discount_net_price" name="discount_net_price" class="textfield pd_2px w_100px h_12px" readonly value="${pricedetail.priceAfterDiscount}" />
						                </label>
						            </div>
						        </div>
						    </div>
							<div class="last_column">
						        <span><input type="text" id="discount_net_sum" name="discount_net_sum" class="textfield pd_2px w_100px color_f73107" style="border-style:none;text-align:right" readonly value="${pricedetail.amountAfterDiscount}" /></span>
						    </div>
						    <div class="btn_column">
								<a class="btn_delete mrg_0x25px deleteprod hand" onclick="removeProdItem('${pricedetail.pk_pricedata_b}')"></a>
							</div>
						</div>
					</c:if>
				</c:forEach>
				</div>
				<div class="bid_product_prices bdbtm_dashed">
					<div class="float_left"></div>
				    <div class="float_right w_172px">
				        <strong resid="0ec22211-000038" class="float_left">金额：</strong>
				        <label class="float_left">
					        	<input type="text" id="prod_total_amount" name="prod_total_amount" value="${PRICE_TOTAL_PROD}" class="textfield" style="border-style:none;text-align:left;margin:17px 0;width:110px;font-weight:bold;color:#FB0000" readOnly />
				        </label>
				    </div>
				</div>
				</c:if>
				<c:forEach items="${PRICE_FORM}" var="price">
					<input type="hidden" name="signature" value="${price.signature}"/>
					<input type="hidden" name="pk_pur_project" value="${price.pk_pur_project}"/>
					<input type="hidden" name="pk_purproj_step" value="${price.pk_purproj_step}"/>
					<input type="hidden" name="pk_release_h" value="${price.pk_release_h}"/>
					<input type="hidden" name="pk_pricetplt_h" value="${price.pk_pricetplt_h}"/>
					<input type="hidden" name="pk_supplier" value="${price.pk_supplier}"/>
					<input type="hidden" name="pk_pricedata_h" value="${price.pk_pricedata_h}"/>
					<input type="hidden" name="is_prod_item" value="${price.is_prod_item}"/>
					<c:if test="${price.is_prod_item == 'n' ||  price.is_prod_item =='N'}">
						<div class="bid_product_prices bdbtm_dashed">
						    <div class="float_left">${price.price_unit}</div>
						    <div class="float_right w_172px">
						        <strong resid="0ec22211-000038" class="float_left">金额：</strong>
						        <label class="float_left">
						        <input id="total_amount" name="total_amount" class="textfield w_100px pd_5x2px h_12px" value="${price.total_amount}" onchange="subReduNum(this,'${MONEY_PRECISION}');doCalLastTotalAmount();" onkeypress="javascript:keyPress(this,event);" />
						        </label>
						    </div>
						</div>
					</c:if>
					<c:if test="${price.is_prod_item == 'y' ||  price.is_prod_item =='Y'}">
						<input type="hidden" id="total_amount" name="total_amount" class="textfield w_100px pd_5x2px h_12px" value="${price.total_amount}"  />
					</c:if>
				</c:forEach>
				</div>
				</c:if>
				<div class="bid_module_title single">
					<strong resid="0ec22211-000039">说明</strong>
				    <div class="float_right w_230px">
				    	<dl class="amount single">
				        	<dt resid="0ec22211-000040">合计金额：</dt>
				        	<dd><input type="text" id="last_total_amount" name="last_total_amount" value="${PRICE_TOTAL}" class="textfield" style="border-style:none;text-align:left;margin:8px 0;width:120px;font-weight:bold;color:#FB0000;font-size:15px;font-weight:bold" readOnly /></dd>
				        </dl>
				    </div>
				</div>
				<div id="bidDeliverForm" class="bid_content_inner pd_10x0px">
					<div class="form_row">
					    <div resid="0ec22211-000041" class="form_title w_94px">交货地址</div>
					    <div class="form_field">
					        <label><input id="deliver_address" name="deliver_address" class="textfield pd_5x2px w_485px" value="${REPLY_FORM.deliver_address}" /></label>
					    </div>
					</div>
					<div class="form_row">
					    <div class="form_title w_80px"></div>
					    <div class="form_field">
					    </div>
					</div>
					<div class="form_row">
					    <div resid="0ec22211-000042" class="form_title w_94px">交货期</div>
					    <div class="form_field">
					        <label ><input id="delivery_date" name="delivery_date" class="textfield pd_5x2px w_180px" style="width:180px;height:18px;" value="${REPLY_FORM.delivery_date}" /></label>
					    </div>
					</div>
					<div class="form_row">
					    <div resid="0ec22211-000043" class="form_title w_94px">质保期</div>
					    <div class="form_field">
					        <label><input id="quality_date" name="quality_date" class="textfield pd_5x2px w_180px" style="width:180px;height:18px;" value="${REPLY_FORM.quality_date}" /></label>
					    </div>
					</div>
					<div class="form_row">
					    <div resid="0ec22211-000044" class="form_title w_94px">运输方式</div>
					    <div class="form_field">
					        <label><input id="transport_mode" name="transport_mode" class="textfield pd_5x2px w_180px" value="${REPLY_FORM.transport_mode}" /></label>
					    </div>
					</div>
					<div class="form_row">
					    <div resid="0ec22211-000045" class="form_title w_94px">安装方式</div>
					    <div class="form_field">
					        <label><input id="install_mode" name="install_mode" class="textfield pd_5x2px w_180px" value="${REPLY_FORM.install_mode}" /></label>
					    </div>
					</div>
					<div class="form_row">
					    <div resid="0ec22211-000046" class="form_title w_94px">付款方式</div>
					    <div class="form_field">
					        <label><input id="pay_mode" name="pay_mode" class="textfield pd_5x2px w_180px" value="${REPLY_FORM.pay_mode}" /></label>
					    </div>
					</div>
					<div class="form_row">
					    <div resid="0ec22211-000092" class="form_title w_94px">应答说明</div>
					    <div class="form_field">
					        <label>
					            <textarea id="reply_note" name="reply_note" rows="4" cols="50" class="textfield pd_5x2px w_485px"><c:if test="${REPLY_FORM.reply_note != null}">${REPLY_FORM.reply_note}</c:if></textarea>
					        </label>
					    </div>
					</div>
				</div>
				<div class="bid_submit_btn">
					<% if (!"readOnly".equals(strReadOnly)){%>
				    <a href="javascript:doReply();" id="bidSubmit" class="btn_orange" >
				        <span resid="0ec22211-000048" class="w_80px h_25px ft_12px">提交</span>
				    </a>
				    <%}%>
				</div>
				<div id="show_msg" style="color:red;float:left;height:31px;margin-top:17px;text-align:right;width:635px;">
				</div>
			</div>
			<div class="bid_column_right">
			    <div class="sidebox">
			        <div class="box_title bg_blue">
			            <span class="title_icon noicon"></span>
			            <span resid="0ec22211-000049" class="title_name">项目信息</span>
			        </div>
			        <div class="sidebox_bd bdbtm bdgray">
			            <div class="bid_column_content h_142px">
			                <strong>${PURPROJECT_FORM.project_name}</strong>
			                <div class="float_left w_100ps">
			                    <span resid="0ec22211-000050">类型：</span><span>${PURPROJECT_FORM.sugg_pur_method}</span>
			                </div>
			                <div class="float_left w_100ps">
			                    <span resid="0ec22211-000051">发起时间：</span><span>${PURPROJECT_FORM.begin_exec_date}</span>
			                </div>
			                <div class="float_left w_100ps">
			                    <span resid="0ec22400-000109">币种：</span><span>${PURPROJECT_FORM.currency_name}</span>
			                </div>
			            </div>
			        </div>
			    </div>
			    <div class="sidebox">
			        <div class="box_title bg_blue">
			            <span class="title_icon noicon"></span>
			            <span resid="0ec22211-000052" class="title_name">当前步骤信息</span>
			        </div>
			        <div class="sidebox_bd bdbtm bdgray">
			            <div class="bid_column_content h_165px">
			                <div class="float_left w_100ps">
			                    <span resid="0ec22211-000053">提交人：</span><span>${REPLY_FORM.commit_psn_name}</span>
			                </div>
			                <div class="float_left w_100ps">
			                    <span resid="0ec22211-000054">提交时间：</span><span>${REPLY_FORM.commit_time}</span>
			                </div>
			            </div>
			        </div>
			    </div>
			</div>
		</div>
	</div>
</div>
</form>
<form id="calpriceform" name="calpriceform" method="post" action="<%=basePath%>/sourcing/biddingprojlist/calprice">
	<!-- 集团 -->
	<input type="hidden" id="pk_group_cal" name="pk_group_cal" value="${PURPROJECT_FORM.pk_group}"/>
	<input type="hidden" id="pk_org_cal" name="pk_org_cal" value="${PURPROJECT_FORM.pk_org}"/>
	<!-- 产品 -->
	<input type="hidden" id="pk_prod_cal" name="pk_prod_cal" value=""/>
	<!-- 报价币种 -->
	<input type="hidden" id="pk_currency_cal" name="pk_currency_cal" value="${PURPROJECT_FORM.pk_currency}"/>
	<!-- 报价单位 -->
	<input type="hidden" id="pk_unit_cal" name="pk_unit_cal" value=""/>
	<!-- 主单位 -->
	<input type="hidden" id="pk_primary_unit_cal" name="pk_primary_unit_cal" value=""/>
	<!-- 报价数量 -->
	<input type="hidden" id="amount_cal" name="amount_cal" value=""/>
	<!-- 主数量 -->
	<input type="hidden" id="primary_amount_cal" name="primary_amount_cal" value=""/>
	<!-- 换算率 -->
	<input type="hidden" id="conversion_rate_cal" name="conversion_rate_cal" value=""/>
	<!-- 扣税类别 -->
	<input type="hidden" id="tax_type_cal" name="tax_type_cal" value=""/>
	<!-- 税率 -->
	<input type="hidden" id="tax_rate_cal" name="tax_rate_cal" value=""/>
	<!-- 折扣率 -->
	<input type="hidden" id="discount_rate_cal" name="discount_rate_cal" value=""/>
	<!-- 含税单价 -->
	<input type="hidden" id="has_tax_price_cal" name="has_tax_price_cal" value=""/>
	<!-- 含税金额 -->
	<input type="hidden" id="has_tax_sum_cal" name="has_tax_sum_cal" value=""/>
	<!-- 含税净价 -->
	<input type="hidden" id="has_tax_net_price_cal" name="has_tax_net_price_cal" value=""/>
	<!-- 主含税净价 -->
	<input type="hidden" id="primary_hastax_net_price_cal" name="primary_hastax_net_price_cal" value=""/>
	<!-- 无税单价 -->
	<input type="hidden" id="no_tax_price_cal" name="no_tax_price_cal" value=""/>
	<!-- 无税金额 -->
	<input type="hidden" id="no_tax_sum_cal" name="no_tax_sum_cal" value=""/>
	<!-- 无税净价 -->
	<input type="hidden" id="no_tax_net_price_cal" name="no_tax_net_price_cal" value=""/>
	<!-- 主无税净价 -->
	<input type="hidden" id="primary_notax_net_price_cal" name="primary_notax_net_price_cal" value=""/>
	<!-- 价税合计 -->
	<input type="hidden" id="price_tax_sum_cal" name="price_tax_sum_cal" value=""/>
	<input type="hidden" id="tax_sum_cal" name="tax_sum_cal" value=""/>
	<!-- 计算字段顺序 -->
	<input type="hidden" id="property_cal" name="property_cal" value="has_tax_price|amount"/>
</form>
<script language="javascript">

	function jy(input,kg,sljg)
	{
		if("1" != kg)
		{
			return;
		}
		if(sljg == null || "" == sljg)
		{
			return;
		}
		if("0" == sljg)
		{
			input.value = "";
			alert("由于您上轮没有报价，这轮不能再报价！");
			return;
		}
		if(input.value != "")
		{
			var cc = parseFloat(input.value); 
			var sc = parseFloat(sljg);
			if(cc > sc)
			{
				input.value = "";
				alert("此次报价：" + cc + "不能大于上一轮报价:" + sc + "！");
				return;
			}
		}
		
	}
	//寻源环节导航栏
	$.ajax( {
		url : "<%=request.getContextPath()%>/sourcing/biddingprojlist/projexec?pk_pur_project=${PURPROJECT_FORM.pk_pur_project}&randomid="+new Date(),
		type : "GET",
		data : "",
		dataType : "text",
		async : false,
		success : function(responseText) {
		    		showSteps(responseText);
		  		}

	});
	
	//应答截止时间
	var overDate = ${DISMILL} * 1000;
    var NowTime = new Date();
    var EndTime= new Date(NowTime.getTime() + overDate); 
    $( "#countdownTimer" ).UICountdown({ 'endTime': EndTime, 'titleShadow': true });
    $( "#bidInvitedForm input, #bidInvitedForm textarea" ).UITipInside();
    
    //设置界面显示精度
    //setShowPrecision();
	roundTwo2();
	afterReplyMsgShow();
	<% if ("readOnly".equals(strReadOnly)){%>
	$("form input").prop("readOnly",true);
	$("textarea").prop("readOnly",true);;
	<% }%>
</script>
</body>
</html>